#include "gun.h"
#include "normalgun.h"
#include "circlegun.h"

namespace fireplane{
	Gun* Gun::createGun(CreateArg* arg){
		Gun	* gun = NULL;
		switch(arg->_type){
			case GT_normal_gun:
				{
					gun = new NormalGun();
					gun->InitGun(arg);
					gun->autorelease();
				}
			break;
			
			case CT_circle_gun:
				{
					gun = new CircleGun();
					gun->InitGun(arg);
					gun->autorelease();
				}
				break;
		}

		return gun;
	}

	Gun::Gun():
		_bulletType(Bullet::BT_dir_bullet)
	{}

	Gun::~Gun()
	{}
}